package com.dave.gd.core.common.globalsession;

/**
 * 在Redis中存储键的生成类
 * 
 * @author Administrator
 * 
 */
public class StoreKeyGenerator {
    
    private final String sessionId; // session标识号
    private final String namespace; // 命名空间
                                    
    public StoreKeyGenerator(String sessionId, String namespace) {
        this.sessionId = sessionId;
        this.namespace = namespace;
    }
    
    public String generate(String name) {
        return "GlobalSession::" + sessionId + "::" + namespace + "::" + name;
    }
    
}
